<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title> 4-8 退出循环break</title>
    <link rel="stylesheet" type="text/css" href="../../../css/style.css"/>
    <style type="text/css">
    </style>

    <script type="text/javascript">
        var mynum =new Array(70,80,66,90,50,100,89);//定义数组mynum并赋值
        var i=0;
        while(i<mynum.length)
        {
            if(mynum[i]<60)
            {
                document.write("成绩"+mynum[i]+"不及格，不用循环了"+"<br>");
                break;  //如果数字小于60就直接不显示
            }
            document.write("成绩:"+mynum[i]+"及格，继续循环"+"<br>");
            i=i+1;

        }
    </script>
</head>

<body>
<div align="center">
    <p><a href="../../index.php#jsjjp" class="fontSize" title="点击进入该目录">目录</a></p>
</div>



<script type="text/javascript">

</script>

</body>
</html>
